package service

import (
	sqlc "bgs/db/sqlc"
)

func (s *OrderServiceImp) MapOrderDetailEntityToPtr(list []sqlc.OrderDetail) []*sqlc.OrderDetail {
	ptrs := make([]*sqlc.OrderDetail, len(list))
	for i := range list {
		ptrs[i] = &list[i]
	}
	return ptrs
}

func (s *OrderServiceImp) MapOrderDistributorCommissionEntityToPtr(list []sqlc.OrderDistributorCommission) []*sqlc.OrderDistributorCommission {
	ptrs := make([]*sqlc.OrderDistributorCommission, len(list))
	for i := range list {
		ptrs[i] = &list[i]
	}
	return ptrs
}

func (s *OrderServiceImp) MapOrderBonusEntityToPtr(list []sqlc.OrderBonuse) []*sqlc.OrderBonuse {
	ptrs := make([]*sqlc.OrderBonuse, len(list))
	for i := range list {
		ptrs[i] = &list[i]
	}
	return ptrs
}
